/**
 * Created with IntelliJ IDEA.
 * User: 12629
 * Date: 2022/2/21
 * Time: 21:44
 * Description:
 */
class Person {

    public void test() {
        System.out.println("Person::test()");
    }
}
//
public class TestDemo5 {

    public static void main(String[] args) {
        //new Person();
        new Person(){

        }.test();
    }

    public static void func(int[] array) {

    }

    public static void func2(Person person) {

    }


    public static void main2(String[] args) {
        Person person = new Person();
        person.test();
        person.test();

        new Person().test();//匿名对象   只能使用1次
        new Person().test();

        func2(new Person());

    }

    public static void main1(String[] args) {
        int[] array = new int[]{1,2,3};
        func(array);

        func(new int[]{1,2,3});


    }
}
